package com.fqgj.xjd.user.client;
/**
 * Created by zhangxingyun on 17/7/23.
 */

import com.fqgj.common.api.Response;
import com.fqgj.xjd.user.client.response.UserAuthFaceRecognition;
import com.fqgj.xjd.user.client.response.UserAuthFaceRecognitionHistory;
import com.fqgj.xjd.user.client.enums.FaceFailReasonTypeEnum;
import com.fqgj.xjd.user.client.enums.FaceRecognitionTypeEnum;

import java.util.List;

/**
 * @ClassName:
 * @Description: 用户图片认证服务
 * @Author zhangxingyun
 * @Create 2017-07-23 15:25
 */
public interface UserAuthPictureService {


    /**
     * 保存人脸识别信息
     * @param userAuthFaceRecognition
     * @param faceRecognitionTypeEnum
     * @return
     */
    Response<Boolean> addFaceRecognitionAuth(UserAuthFaceRecognition userAuthFaceRecognition, FaceRecognitionTypeEnum faceRecognitionTypeEnum);


    /**
     * 人脸识别成功
     * @param userAuthFaceRecognition
     * @param faceRecognitionTypeEnum
     * @return
     */
    Response<Boolean> faceRecognitionAuthSuccess(UserAuthFaceRecognition userAuthFaceRecognition, FaceRecognitionTypeEnum faceRecognitionTypeEnum);


    /**
     * 人脸识别失败
     * @param userAuthFaceRecognitionHistory
     * @return
     */
    Response<Boolean> faceRecognitionAuthFailed(UserAuthFaceRecognitionHistory userAuthFaceRecognitionHistory);


    /**
     * 更新人脸信息
     * @param userAuthFaceRecognition
     * @param faceRecognitionTypeEnum
     * @return
     */
    Response<Boolean> updateFaceRecognition(UserAuthFaceRecognition userAuthFaceRecognition,FaceRecognitionTypeEnum faceRecognitionTypeEnum);

    /**
     * 获取人脸识别信息
     * @param userCode
     * @param faceRecognitionTypeEnum
     * @return
     */
    Response<UserAuthFaceRecognition> getFaceRecognitionByUserCodeAndType(String userCode,FaceRecognitionTypeEnum faceRecognitionTypeEnum);

    /**
     * 获取用户人脸图片信息
     * @param userCode
     * @return
     */
    Response<List<UserAuthFaceRecognition>> getFaceRecognitionByUserCode(String userCode);


    /**
     * 通过userId与类型获取用户人脸识别失败次数
     * @param userCode
     * @param faceFailReasonTypeEnumList
     * @return
     */
    Response<List<UserAuthFaceRecognitionHistory>> getFaceRecognitionHistoryListByUserCodeAndTypes(String userCode, List<FaceFailReasonTypeEnum> faceFailReasonTypeEnumList);


    /**
     * 删除人脸识别历史信息
     * @param ids
     * @param faceFailReasonTypeEnumList
     * @return
     */
    Response<Boolean> deleteFaceRecognitionHistoriesByIdsAndTypes(List<Long> ids, List<FaceFailReasonTypeEnum> faceFailReasonTypeEnumList);


    /**
     * 后台图片校验通过
     * @param userCode
     * @param faceRecognitionTypeEnum
     * @return
     */
    Response<Boolean> auditFaceRecognitionPass(String userCode, FaceRecognitionTypeEnum faceRecognitionTypeEnum);


    /**
     * 后台图片校验不通过
     * @param userCode
     * @param faceRecognitionTypeEnum
     * @param reason
     * @return
     */
    Response<Boolean> auditFaceRecognitionReject(String userCode, FaceRecognitionTypeEnum faceRecognitionTypeEnum, FaceFailReasonTypeEnum reason);

}
